﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "StudentNote")]
    public class StudentNoteInfo : IDetach
    {
        public StudentNoteInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private int _stuid = 0;
        private string _notecontent = "";
        private DateTime _notetime = DateTime.Now;
        /// <summary>
        /// 
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int StuId
        {
            set { _stuid = value; }
            get { return _stuid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        [DisplayName("内容")]
        [Required(ErrorMessage = "必须填写")]
        public string NoteContent
        {
            set { _notecontent = value; }
            get { return _notecontent; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime NoteTime
        {
            set { _notetime = value; }
            get { return _notetime; }
        }
        #endregion Model

        public void Detach()
        {

        }
    }
}
